package com.example.mybatisplusdemo.exceptionHandle;

public class LoginException extends BusinessException {
    public static final int USER_NOT_FOUND = 1001;
    public static final int PASSWORD_ERROR = 1002;
    
    public LoginException(int code, String message) {
        super(code, message);
    }
    
    public static LoginException userNotFound() {
        return new LoginException(USER_NOT_FOUND, "用户不存在");
    }
    
    public static LoginException passwordError() {
        return new LoginException(PASSWORD_ERROR, "密码错误");
    }
}
